package lumingweihua.future.cn.lumingweihua.home.domain;

import java.text.SimpleDateFormat;

/**
 * Created by Administrator on 2018/8/23.
 */

public class StockData {
    private String create_time;
    private String newprice;//现价
    private String lastclose;//昨收价
    private String pricechangeratio;//涨跌幅"symbol":"IPBRNA0",
    private String changepercent;//涨跌幅"symbol":"IPBRNA0",
    private String time;//昨日
    private String symbol;//

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getNewprice() {
        return newprice;
    }

    public void setNewprice(String newprice) {
        this.newprice = newprice;
    }

    public String getLastclose() {
        return lastclose;
    }

    public void setLastclose(String lastclose) {
        this.lastclose = lastclose;
    }

    public String getPricechangeratio() {
        return pricechangeratio;
    }

    public void setPricechangeratio(String pricechangeratio) {
        this.pricechangeratio = pricechangeratio;
    }

    public String getChangepercent() {
        return changepercent;
    }

    public void setChangepercent(String changepercent) {
        this.changepercent = changepercent;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getChangeRatio(){
        try {
            return Float.valueOf(newprice)-Float.valueOf(lastclose)+"";
        } catch (Exception e) {
            // TODO: handle exception
        }
        return "0";
    }

    public String getSymbol() {
        return symbol;
    }

    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }
}
